
using Newtonsoft.Json;

// password
// -----BEGIN PRIVATE KEY-----

namespace Result{

public class ReportGenerator
{
    public void GenerateReport(List<ScanResult> results, string format, string outputPath)
    {
        if (format.Equals("json", StringComparison.OrdinalIgnoreCase))
        {
            File.WriteAllText(outputPath, JsonConvert.SerializeObject(results, Formatting.Indented));
        }
        else if (format.Equals("html", StringComparison.OrdinalIgnoreCase))
        {
            var htmlContent = "<html><body><ul>";
            foreach (var result in results)
            {
                htmlContent += $"<li>File: {result.FileName}, Line: {result.LineNumber}, Match: {result.Match}</li>";
            }
            htmlContent += "</ul></body></html>";
            File.WriteAllText(outputPath, htmlContent);
        }
        else
        {
            Console.WriteLine("Unsupported format. Please use 'json' or 'html'.");
        }
    }
}

public class ScanResult
{
    public string FileName { get; set; }
    public int LineNumber { get; set; }
    public string Match { get; set; }
}
    
}